package com.chixing.day17.ThreadTest;

/**
 * 模拟1000个终端，每个终端向A账户存款10元。要求最后的账户余额正确
 */
public class BankThread extends Thread{
    private  Account account;

    public BankThread(Account account) {
        this.account = account;
    }

    @Override
    public void run(){
        this.account.depoist(10);
        this.account.withdraw(5);
    }
}
